import{defineComponent as r,reactive as s,computed as o,createVNode as t,mergeProps as a}from"vue";import{avatarProps as e,avatarEmits as l,ElAvatar as n}from"element-plus";import{Picture as m}from"@element-plus/icons-vue";import{definePropType as c,useProps as u,useRender as i,useExpose as f,makeSlots as p}from"@fast-china/utils";const d={...e,icon:{type:c([String,Object,Function]),default:()=>m},original:Boolean,normal:Boolean,small:Boolean,thumb:Boolean},v={...l},b=/* @__PURE__ */r({name:"FaAvatar",props:d,emits:v,slots:p(),setup(r,{attrs:l,slots:m,emit:c,expose:p}){const d=s({src:o(()=>{if(r.src)return r.original?r.src:r.normal?`${r.src}@!normal`:r.small?`${r.src}@!small`:(r.thumb,`${r.src}@!thumb`)})}),v=u(r,e,["src"]);return i(()=>t(n,a(v.value,{class:"fa-avatar",src:d.src,onError:r=>c("error",r)}),{default:()=>[m.default&&m.default({src:d.src})]})),f(p,{src:d.src})}});export{b as default,v as faAvatarEmits,d as faAvatarProps};
//# sourceMappingURL=avatar.mjs.map
